package synapses;

import neurons.NeuronInterface;
import signal.SignalInterface;

public class NormalSynapseFromNeuron extends SynapseAbstract {

	private NeuronInterface neuronIn;
	private SynapseInterface synapseOut;

	public NormalSynapseFromNeuron(NeuronInterface neuron) {
		neuron.growOutGoingSynapse(this);
		this.neuronIn = neuron;
		charged = false;
	}

	public void setSynapseOut(SynapseInterface synapse) {
		synapseOut = synapse;
	}

	@Override
	public void transmit(SignalInterface whatIDeliver) {
		System.out.println(toString() + " transmitting : "
				+ whatIDeliver.getData());
		if (synapseOut != null) {
			synapseOut.transmit(whatIDeliver);
		}

	}

}
